package org.blame.logisticsservice.listener;

import org.blame.logisticsservice.model.UserInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class OrderListener {

    @RabbitListener(queues = "queue.build")
    public void listenerQueue(String message){
        System.out.println("接收到的消息"+message);
    }

    @RabbitHandler
    @RabbitListener(queues = "queue.build")
    public void ListenerQueue(UserInfo userinfo){
        System.out.println("接收到的消息"+userinfo);
    }
}
